package com.example.novelstory.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

@ApiModel(value = "用户书架")
@Data
@TableName("bookshelf")
public class BookShelf {
    @TableId(type = IdType.AUTO)
    public int id;
    @ApiModelProperty("用户ID")
    public int author_id;
    @ApiModelProperty("小说ID")
    public int novel_id;
    @ApiModelProperty("小说名字")
    public String title;
    @ApiModelProperty("章节ID")
    public int chapter_id;
    @ApiModelProperty("章节标签")
    public String chapter_key;
    @ApiModelProperty("数据状态")
    public Byte status;//tinyint
    @JsonFormat(pattern="yyyy-MM-dd hh:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    @ApiModelProperty("创建时间")
    public Date create_time;
    @JsonFormat(pattern="yyyy-MM-dd hh:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    @ApiModelProperty("更新时间")
    public Date update_time;
}
